<template>
  <div>
    <HelloWorld />
    <h1>{{ fromSon }}</h1>
  </div>
</template>

<script>
import HelloWorld from "../components/HelloWorld.vue";
export default {
  data() {
    return {
      msg: "这是来自父组件的msg",
      fromSon: "",
    };
  },
  methods: {},
  created() {},
  mounted() {
    this.fromSon = this.$children[0].msg;
    console.log(this.$children);
  },
  components: {
    HelloWorld,
  },
  computed: {},
  watch: {},
};
</script>

<style lang="scss" scoped></style>
